/*
 * 组件懒加载
 */

import {
  content,
  homepage,
  secondary,

  //王-开始
  BusinessListings,
  DepositRequest,
  FinancialStatements,
  DepositRecord,
  MerchantAccountChange,
  //王-结束

  MerchantBackground,
  ManualRecharge,
  RechargeApplication,
  fundDetails,
  RechargeRecord,
  MerchantPendingOrders,
  Message,

  
  Caidan,
  Jueshe,
  Yonghu,
  Journal,
  PaymentManagement,
  PaymentOrder,
  Audit,
  ClientLIst,
  Detail,

  //郭
  Merchant,
  CardvendorList,
  CardvendorDetail,
} from './component_add'

/*
 * 权限路由表
 */

export const permissionRouter = [{
  path: '/',
  name: 'Content',
  redirect: "/login",
  component: content,
  meta: {
    authRequired: true
  },
  children: [
    // 将自己的 view 文件路径添加在此处
    {
      path: 'homepage',
      name: 'HomePage',
      component: homepage,
      meta: {
        label: '首页',
        roles: ['管理员', '商户', '代理商'],
        icon: 's-home'
      }
    },
    //以下为王
    {
      path: 'BusinessListings',
      name: 'BusinessListings',
      component: secondary, //一级菜单里 该组件必加
      meta: {
        label: '商户管理',
        roles: ['管理员', '商户'],
        icon: 'bangzhu'
      },
      children: [{
        path: "/BusinessListings",
        name: "BusinessListings",
        component: BusinessListings,
        meta: {
          label: "商户列表",
          icon: "s-promotion",
          roles: ['管理员', '商户']
        }
      },
      {
        path: "/DepositRequest",
        name: "DepositRequest",
        component: DepositRequest,
        meta: {
          label: "入金请求",
          icon: "s-promotion",
          roles: ['管理员', '商户']
        }
      },
      {
        path: "/FinancialStatements",
        name: "FinancialStatements",
        component: FinancialStatements,
        meta: {
          label: "财务报表",
          icon: "s-promotion",
          roles: ['管理员', '商户']
        }
      },
      {
        path: "/DepositRecord",
        name: "DepositRecord",
        component: DepositRecord,
        meta: {
          label: "入金记录",
          icon: "s-promotion",
          roles: ['管理员', '商户']
        }
      },
      {
        path: "/MerchantAccountChange",
        name: "MerchantAccountChange",
        component: MerchantAccountChange,
        meta: {
          label: "商户账变",
          icon: "s-promotion",
          roles: ['管理员', '商户']
        }
      },
      ],
    },
    //以上为王

    // 龙少
    {
      path: 'MerchantBackground',
      name: 'MerchantBackground',
      component: secondary,
      meta: {
        label: '商户后台',
        roles: ['管理员', '商户'],
        icon: 's-goods'
      },
      children: [
        {
          path: "/Message",
          name: "Message",
          component: Message,
          meta: {
            label: "商户后台",
            icon: "s-promotion",
            roles: ['管理员', '商户']
          }
        },
        {
        path: "/MerchantInformation",
        name: "MerchantInformation",
        component: MerchantBackground,
        meta: {
          label: "商户信息",
          icon: "s-promotion",
          roles: ['管理员', '商户']
        }
      },
      {
        path: "/ManualRecharge",
        name: "ManualRecharge",
        component: ManualRecharge,
        meta: {
          label: "手工充值",
          icon: "s-promotion",
          roles: ['管理员', '商户']
        }
      },
      {
        path: "/RechargeApplication",
        name: "RechargeApplication",
        component: RechargeApplication,
        meta: {
          label: "充值申请",
          icon: "s-promotion",
          roles: ['管理员', '商户']
        }
      },
      {
        path: "/fundDetails",
        name: "fundDetails",
        component: fundDetails,
        meta: {
          label: "资金明细",
          icon: "s-promotion",
          roles: ['管理员', '商户']
        }
      },
      {
        path: "/RechargeRecord",
        name: "RechargeRecord",
        component: RechargeRecord,
        meta: {
          label: "充值记录",
          icon: "s-promotion",
          roles: ['管理员', '商户']
        }
      },
      {
        path: "/MerchantPendingOrders",
        name: "MerchantPendingOrders",
        component: MerchantPendingOrders,
        meta: {
          label: "代付订单",
          icon: "s-promotion",
          roles: ['管理员', '商户']
        }
      },
      ]
    },
    // 以上是龙少

    // 以下是罗林
    {
      path: "PaymentManagement",
      name: "PaymentManagement",
      component: secondary,
      meta: {
        label: '卡商后台',
        roles: ['管理员', '代理商'],
        icon: 's-help'
      },
      children: [{
        path: "/PaymentIndex",
        name: "PaymentIndex",
        component: PaymentManagement,
        meta: {
          label: "代付管理",
          icon: "s-promotion",
          roles: ['管理员', '代理商']
        }
      },
      {
        path: "/PaymentOrder",
        name: "PaymentOrder",
        component: PaymentOrder,
        meta: {
          label: "代付订单",
          icon: "s-promotion",
          roles: ['管理员', '代理商']
        }
      },
      {
        path: "/Audit",
        name: "Audit",
        component: Audit,
        meta: {
          label: "入金请求",
          icon: "s-promotion",
          roles: ['管理员', '代理商']
        }
      },
      {
        path: "/ClientLIst",
        name: "ClientLIst",
        component: ClientLIst,
        meta: {
          label: "客户端列表",
          icon: "s-promotion",
          roles: ['管理员', '代理商']
        }
      },
      {
        path: "/Detail",
        name: "Detail",
        component: Detail,
        meta: {
          label: "资金明细",
          icon: "s-promotion",
          roles: ['管理员', '代理商']
        }
      },
      ]
    },
    // 以上是罗林

    // 以下是郭馨月
    {
      path: "Cardvendor",
      name: "Cardvendor",
      component: secondary,
      meta: {
        label: '卡商管理',
        roles: ['管理员', '代理商'],
        icon: 's-finance'
      },
      children: [{
        path: "/Merchant",
        name: "Merchant",
        component: Merchant,
        meta: {
          label: "商户配置",
          icon: "s-promotion",
          roles: ['管理员', '代理商']
        }
      },
      {
        path: "/CardvendorList",
        name: "CardvendorList",
        component: CardvendorList,
        meta: {
          label: "卡商列表",
          icon: "s-promotion",
          roles: ['管理员', '代理商']
        }
      },
      {
        path: "/CardvendorDetail",
        name: "CardvendorDetail",
        component: CardvendorDetail,
        meta: {
          label: "卡商明细",
          icon: "s-promotion",
          roles: ['管理员', '代理商']
        }
      }
      ]
    },

    // 以上是郭馨月

    // 以下是susen
    {
      path: "SystemManagement",
      name: "SystemManagement",
      component: secondary,
      meta: {
        label: '系统管理',
        roles: ['管理员'],
        icon: 's-custom'
      },
      children: [{
        path: "/Yonghu",
        name: "Yonghu",
        component: Yonghu,
        meta: {
          label: "用户管理",
          icon: "s-promotion",
          roles: ['管理员']
        }
      },
      {
        path: "/Jueshe",
        name: "Jueshe",
        component: Jueshe,
        meta: {
          label: "角色管理",
          icon: "s-promotion",
          roles: ['管理员']
        }
      },
      {
        path: "/Caidan",
        name: "Caidan",
        component: Caidan,
        meta: {
          label: "菜单管理",
          icon: "s-promotion",
          roles: ['管理员']
        }
      },
      {
        path: "/Journal",
        name: "Journal",
        component:Journal,
        meta: {
          label: "日志管理",
          icon: "s-promotion",
          roles: ['管理员']
        }
      }
      ]
    }
  ]
}]